import NetWork from '@/service/_request.js'
import { NetWork as NetWorkClass } from '@/service/_request.js'

const newNetWorkClass = new NetWorkClass('/')

class meteoroHomeApi {
  //临时：首页-1.1实况数据
  async get_24jx_GetIp(params) {
    return newNetWorkClass.get(
      'https://www.zxweather.cn:9011/api/WC_Home/GetIp',
      params
    )
  }
  //临时：首页-1.2获取地区编号
  async getCitys(params) {
    return newNetWorkClass.post(
      'https://www.zxweather.cn:9011/api/WC_Home/GetCitys',
      params
    )
  }
  //临时：1.3.获取所在地区天气情况
  async getWeather(params) {
    return newNetWorkClass.post(
      'https://www.zxweather.cn:9011/api/WC_Home/GetWeather',
      params
    )
  }

  //首页-实况数据
  async get_tb_skzdzs_24jx_findByCon(params) {
    return NetWork.post(
      'itg/dlqxfw/rds/liveData/live/tb-Skzdzs-24Jx/post_tb-skzdzs-24jx_findByCon',
      params
    )
  }
  //首页-实况数据
  async post_tb_skzdzs_jx_findByCon(params) {
    return NetWork.post(
      'itg/dlqxfw/rds/liveData/live/tb-Skzdzs-Jx/post_tb-skzdzs-jx_findByCon',
      params
    )
  }
  //首页
  async get_findByCon(params) {
    return NetWork.get('itg/dlqxfw/rds/meteData/live/get_findByCon', params)
  }

  //首页-实况数据
  async get_tb_skzdzs_24jx_findByConGet(params) {
    return NetWork.get('itg/dlqxfw/rds/yike/queryWeather', params)
  }
  
  //实况数据 -实况六要素
  async queryByCity(params) {
   

    return NetWork.get('itg/dlqxfw/rds/yike/tb-yike-rain/queryByCity', params)
  }

  //天气
  async Theweather(params) {
   
    return NetWork.get('itg/dlqxfw/rds/yike/tb-yike-month/getData', params)
  }
  //实况数据 -风速
  async lineWin(params) {
   

    return NetWork.post(
      'itg/dlqxfw/rds/analysis/censusLive/tb-Skzdzs-Jx/post_tb-skzdzs-jx_windLine',
      params
    )
  }
  //温度
 
  async lineTemp(params) {
  
    return NetWork.post(
      'itg/dlqxfw/rds/analysis/censusLive/tb-Skzdzs-Jx/post_tb-skzdzs-jx_tempLine',
      params
    )
  }
  //降雨
 
  async lineRain(params) {
   
    return NetWork.post(
      'itg/dlqxfw/rds/analysis/censusLive/tb-Skzdzs-Jx/post_tb-skzdzs-jx_preLine',
      params
    )
  }
  //湿度
  async lineHum(params) {
  
    return NetWork.post(
      'itg/dlqxfw/rds/analysis/censusLive/tb-Skzdzs-Jx/post_tb-skzdzs-jx_rhuLine',
      params
    )
  }

 

  //首页-实况数据
  async index(params) {
  
    return NetWork.get(
      'itg/dlqxfw/rds/yike/tb-yike-live24-h15-day/index',
      params
    )
  }
  //传code
  async getcode(params) {
  
    return NetWork.post('/itg/dlqxfw/rds/user/valid', params)
  }
  //首页温度湿度24小时降水
  async get24Horse(params) {
    return NetWork.post(
      '/itg/dlqxfw/rds/liveData/live/tb-Skzdzs-24Jx/post_tb-skzdzs-jx_findLiveData',
      params
    )
  }
  //权限
  async getPermissions(params) {
    return NetWork.post(
      '/getCity',
      params
    )
  }
}
export default new meteoroHomeApi()
